#region Using directives
using System;
using System.Data;
using WP.Commons;
#endregion

namespace WP.MF.DataEntity
{

    /*
     * Created by Web Smart Create Code Tool
     * At 5/25/2007
     */

    //=========MMiscSwitch  ============================
    [System.ComponentModel.DesignerCategory("Code")]
    public class MMiscSwitchDEL : DataSet, IDataEntity
    {
        //=========mMiscSwitch ============================
        public const string TABLENAME_MMISCSWITCH = "mMiscSwitch";
        public const string RECID = "RecID";
        public const string SWITCHNO = "SwitchNo";
        public const string SWITCHNAME = "SwitchName";
        public const string DESCRIPTION = "Description";
        public const string SWITCHVALUE = "SwitchValue";
        public const string PROGRESSSWITCHNAME = "ProgressSwitchName";
        public const string TYPE = "Type";
        public const string MAXLENGTH = "MaxLength";
        public const string SYSTEMNAME = "SystemName";
        public const string FORMATSTRING = "FormatString";
        public const string CHECKSTRING = "CheckString";
        public const string SPECIALSWITCH = "SpecialSwitch";
        public const string INSWITCHMAINT = "InSwitchMaint";
        public const string NOTUSED = "NotUsed";
        public const string RECSTAMP = "RecStamp";
        //public const string PICTURE = "Picture";
        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public MMiscSwitchDEL()
        {
            //Create mMiscSwitch structure
            CreatemMiscSwitchStructure();

        }

        //=========mMiscSwitch============================
        private void CreatemMiscSwitchStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC = new DataColumn();
            table = new DataTable(TABLENAME_MMISCSWITCH);
            DCC = table.Columns;

            DC = new DataColumn(RECID, typeof(System.Int32));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(SWITCHNO, typeof(System.Int32));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(SWITCHNAME, typeof(System.String));
            DC.MaxLength = 30;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(DESCRIPTION, typeof(System.String));
            DC.MaxLength = 400;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SWITCHVALUE, typeof(System.String));
            DC.MaxLength = 200;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(PROGRESSSWITCHNAME, typeof(System.String));
            DC.MaxLength = 30;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(TYPE, typeof(System.String));
            DC.MaxLength = 30;
            DC.DefaultValue = "Char";
            DCC.Add(DC);

            DC = new DataColumn(MAXLENGTH, typeof(System.Int32));
            DC.DefaultValue = 10;
            DCC.Add(DC);

            DC = new DataColumn(SYSTEMNAME, typeof(System.String));
            DC.MaxLength = 10;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(FORMATSTRING, typeof(System.String));
            DC.MaxLength = 10;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(CHECKSTRING, typeof(System.String));
            DC.MaxLength = 255;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SPECIALSWITCH, typeof(System.Boolean));
            DC.DefaultValue = false;
            DCC.Add(DC);

            DC = new DataColumn(INSWITCHMAINT, typeof(System.Boolean));
            DC.DefaultValue = true;
            DCC.Add(DC);

            DC = new DataColumn(RECSTAMP, typeof(System.Byte[]));
            DCC.Add(DC);

            DC = new DataColumn(NOTUSED, typeof(System.Boolean));
            DC.DefaultValue = true;
            DCC.Add(DC);

            //Key
            DataColumn[] DCS = new DataColumn[1];
            DCS[0] = DCC[RECID];
            table.PrimaryKey = DCS;

            this.Tables.Add(table);
        }

    }
}